<?php
/**
 * Created by PhpStorm.
 * User: 王松
 * Time: 2017/6/2 15:33
 */

namespace App\Transformers;

use App\Models\MedicalRecord;
use League\Fractal\TransformerAbstract;

class MedicalSymptomTransformer extends TransformerAbstract
{
    /**
     * @param \App\Models\MedicalRecord $author
     * @return array
     */
    public function transform(MedicalRecord $author)
    {
        return [
            'id'            => $author->id,
            'name'          => $author->name,
            'deleted_at'    => $author->deleted_at ? true : false,
            'created_at'    => $author->created_at->toDateTimeString(),
            'updated_at'    => $author->updated_at->toDateTimeString(),
        ];
    }
}